Syntax10.Scn.Fnt ParcElems Alloc Syntax14b.Scn.Fnt Syntax8b.Scn.Fnt Syntax12.Scn.Fnt Syntax12b.Scn.Fnt Syntax8.Scn.Fnt Syntax10i.Scn.Fnt Syntax12i.Scn.Fnt Syntax10b.Scn.Fnt Oberon for AmigaTM User's Guide V4 Beta, Release 0.7 (2 August 1994) Stefan H_M Ludwig & Claudio Nieder Copyright 1991- 94, ETH Z Introduction Oberon for AmigaTM is an implementation of OberonTM for Commodore Amiga Systems. Both the programming language Oberon_2 and the Oberon System have been implemented. For a complete description of the Language and of the System, one should read the following books: N. Wirth and M. Reiser: Programming in Oberon. Steps beyond Pascal and Modula_2. Addison Wesley, 1992, ISBN 0_201_56543_9. Tutorial for the Oberon programming language and concise language reference. M. Reiser: The Oberon System. User Guide and Programmer's Manual. Addison Wesley, 1991, ISBN 0_201_54422_9. User manual for the programming environment and reference for the standard module library. N. Wirth and J. Gutknecht: Project Oberon. The Design of an Operating System and Compiler. Addison Wesley, 1992, ISBN 0_201_54428_8. Program listings with explanations for the whole Oberon system, including the compiler for NS32000. ssenb ck: Object_Oriented Programming in Oberon_2 Springer_Verlag, 1993, ISBN 0_387_56411_X. Principles and applications of object_oriented programming with examples in Oberon_2. The technical report 160 by H. M ssenb ck, Differences between Oberon and Oberon_2, The Programming Language Oberon_2, is recommended too. It is present as on_line documentation: Edit.Open Oberon2.Differences.Text Edit.Open Oberon2.Report.Text The following short tutorial describes the differences to the original implementation from a user's point of view. Oberon for Amiga runs as a single Amiga process on any system with at least a 68020 processor and floating point coprocessor featuring Amiga OS 2.0 or newer. It uses an own screen as display. The dimensions of the user track and the system track are automatically defined when starting Oberon for Amiga and cannot be changed until the Oberon process terminates. Installation Oberon for Amiga is distributed as an lha archive (see the accompaning readme file for a description of the contents). The archive contents have to be copied into a common directory (e.g. Work:Oberon). This directory should be put in your command search path. Oberon for Amiga is started using a script which name is oberon. The environment variable OBERON is used, when defined, as search path for files. Starting Oberon for Amiga Oberon for Amiga is started from a shell window using the script oberon or from the workbench using the icon. The syntax is: oberon [H=HEAP/N heapsizeinMB] [[CMD=COMMAND] module.command] where - heapsizeinMB is the size of the allocated Oberon heap in MB (default: depending on free memory) - the command module.command is executed (default: CMD Oberon.Loop) Note: The options above are not yet supported When started for the first time, Oberon for Amiga will ask for the preferred screen mode and resolution. This information will be stored in the environment variable Oberon for Amiga. The command System.ChangeMode can be used to change the value at a later time. If Oberon for Amiga gets out of control (e.g. because of a looping command), press Ctrl_C in the terminal window (do not forget to set the focus first) or doubleclick on the KillOberon icon. The Amiga OS has problems if a process is interrupted, while it is waiting for a message reply. To avoid problems, Ctrl_C refuses to work when it detects a possible critical situation. System.Quit terminates the oberon process. It is the normal way to leave Oberon for Amiga. Differences to the Original Oberon The differences are due to the underlying hardware and software. Here follows a list of modules containing differences: System New commands: - Quit to leave Oberon for Amiga - Execute command to execute a (non_interactive) shell command - ChangeDirectory newdir to change the working directory - ChangeMode to get a screen mode requester for changing the screen mode. Note: The change will only take effect after a restart of Oberon for Amiga. Amiga* Amiga specific modules, by which the Oberon System gains access to the Amiga libraries. Display Imports Amiga*. Procedures DefCC, DefCP, DrawCX, FadeCX, InitCC, InitCP, SetCursor are not implemented. Procedure SetMode has no effect. The display bitmap is not directly accessible (Map returns 0). Pattern format is different, use Display.NewPattern to define a pattern. image[1] defines the bottom line of the pattern. image[0] is reserved. Display1 Module exporting additional drawing procedures. Input Input events are buffered. Special keys: F1 mark viewer Esc escape F3 break Input.Time() returns the real time in milliseconds since Oberon for Amiga has been started. Files Exports ChangeDirectory. Types New interface module to the type system. Necessary to implement persistent objects. Oberon Time() returns Input.Time() Printer generates a postscript file named Oberon.Printfile.ps and sends it to the printer if the printer name is not none. (printing not yet supported) Kernel GC may be called at any time, since local pointers (on the stack or in registers) are used as roots during the mark phase of the garbage collection. International Characters The option character is "\" instead of "/". This allows to use "/" in file names (Amiga path names). For questions and bug reports, please write to The Secretary Institut f r Computersysteme ETH Zentrum Tel: (+41_1) 632 7311 CH_8092 Z rich Fax: (+41_1) 261 5389 Switzerland e_mail: oberon@inf.ethz.ch Appendix A: Installing Oberon for Amiga from 3"1/2 floppy diskettes 1. Create a directory for Oberon as described previously under "Installation" cd Work: makedir Oberon 2. Change to this new directory cd Oberon 3. Insert the diskette of Oberon for Amiga in your floppy drive 4. Extract the contents of the archive file into the current directory lha -a x df0:Oberon.lha